package com.tc.gateway.device;

import java.util.ArrayList;
import java.util.Collection;

import com.tc.gateway.device.listener.GeneralDeviceListener;

abstract public class AbstractDevice<T extends GeneralDeviceListener> implements GeneralDevice<T>{
	protected Collection<T> listeners = new ArrayList<T>();
	DeviceConfig config = new DeviceConfig();
	public DeviceConfig getConfig() {
		return config;
	}
	public void setConfig(DeviceConfig config) {
		this.config = config;
	}
	public String getName() {
	
		return config.getName();
	}
	public void setName(String name) {
		config.setName(name);
	}

	public void addListener(T l){
		listeners.add(l);
	}
	abstract public String getId();
	abstract public String getType();
	
	
	
}

